#ifndef GLOBALS_H
#define GLOBALS_H

#include <iostream>
#include <dirent.h>
#include <vector>
#include <string>
#include <Python/Python.h>
#include "tinyxml.h"
#include "ExceptionHandler.h"
#include "ImageManager.h"
#include "Chameleon.h"

using namespace sf;
using namespace std;

#define RESOURCE_DIRECTORY "/Users/richardmarquez/_code/Hellmaco/Hellmaco/Resources/"
#define CONFIG             "system.xml"
#define LEVELS_DIR         "Levels/"
#define CHARACTERS_DIR     "Characters/"

extern ExceptionHandler err;
extern ImageManager     imageManager;
extern TiXmlDocument    sysDoc;
extern TiXmlElement*    sysXml;

#define WINDOW_WIDTH    Chameleon(sysXml->FirstChildElement("window")->Attribute("width"))
#define WINDOW_HEIGHT   Chameleon(sysXml->FirstChildElement("window")->Attribute("height"))
#define WINDOW_TITLE    sysXml->FirstChildElement("window")->Attribute("title")

#define FRAMERATE_LIMIT Chameleon(sysXml->FirstChildElement("framerate")->Attribute("limit"))
#define SHOW_FRAMERATE (string(sysXml->FirstChildElement("framerate")->Attribute("show")).compare("yes") == 0)

vector<string> getDirContents(string directoryName);
TiXmlElement*  getChildElementbyName(string name, TiXmlElement* parent);
Color          getColorFromXml(TiXmlElement* xml);
void*          callPython(string filename, string funcName);

#endif
